
package com.uuah.server.api.config.registry;

import java.util.Collection;
import java.util.Map;

import com.uuah.api.lifecycle.IDisposable;
import com.uuah.api.lifecycle.Initialisable;
import com.uuah.server.exception.registry.RegistrationException;

/**
 *
 * TODO comment ...
 *
 * <p>update record:updator，update time，update content and version</p>
 * @author <a href="jonny_quan@hotmail.com">jonny</a>
 * @date 2009 2009-3-26 下午11:56:03
 * @version 1.0.0
 */
public interface IRegistry extends Initialisable, IDisposable {

	Object lookupObject(String key);


	Collection lookupObjects(Class type);

	Object lookupObject(Class type) throws RegistrationException;


	void registerObject(String key, Object value) throws RegistrationException;


	void registerObject(String key, Object value, Object metadata)
			throws RegistrationException;

	void registerObjects(Map objects) throws RegistrationException;

	void unregisterObject(String key) throws RegistrationException;

	void unregisterObject(String key, Object metadata)
			throws RegistrationException;

	String getRegistryId();

	boolean isReadOnly();
}
